//取出来调用后端接口的地址
import { API_CONFIG } from "../config/index.js";
import request from "../api/index.js";

export const getUserListHandler = () =>{
   return request(API_CONFIG.getUserListApi,{},"get","2000")
}

export const deleteUserHandler = (id) =>{
    return request(API_CONFIG.deleteUserApi,{id},"get","1000")
 }

 //直接接收对象
 export const addUserHandler = (userForm) =>{
    return request(API_CONFIG.addUserApi,userForm,"post","2000")
 }

 export const updateUserHandler = (userForm) =>{
    return request(API_CONFIG.updateUserApi,userForm,"post","2000")
 }